<?php
	
	namespace Aspic\Model;
	use Aspic as A;
	
	interface CrudModelInterface {
		
		/**
		* Should return an object (stdclass) with the row where primary key is equal to $rowPrimarykey
		*/
		public function readRow($rowPrimarykey);
		
		/**
		 * 
		 * @param type $row
		 * @return The id (when auto increment set) of the inserted row
		 */
		public function addRow($row);
		public function updateRow($row);
		public function deleteRow($rowPrimarykey);
		
		##### Used for opposite foreign keys #####
		
		public function fetchRows($colName, $colValue);
		public function deleteRows($colName, $colValue);
	}
	
?>